<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>新闻中国后台管理系统--登录</title>

    <!-- Bootstrap -->
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link href="css/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <!-- NProgress -->
    <link href="css/nprogress/nprogress.css" rel="stylesheet">

    <!-- Custom Theme Style -->
    <link href="css/custom.min.css" rel="stylesheet">
    <script type="text/javascript" src="js/jquery-1.12.4.js"></script>
</head>

<body class="login">
    <div>
      <a class="hiddenanchor" id="signup"></a>
      <a class="hiddenanchor" id="signin"></a>

      <div class="login_wrapper">
        <div class="animate form login_form">
          <section class="login_content">
            <form action="adminlogin.do" method="post">
              <h1>新闻系统后台登录</h1>
              <div>
                <input name="userName" type="text" class="form-control" placeholder="Username"  />
              </div>
              <div>
                <input name="userPass" type="password" class="form-control" placeholder="Password" />
              </div>
              <div id="msg"></div>
               <div>
                <input  id="code" name="code" type="text" class="form-control" placeholder="请输入验证码"  />
             <img style="cursor:pointer;" id="imgcode"  src="getcode" onclick="imgrefresh()">
             <script>
             function imgrefresh(){
            	 document.getElementById("imgcode").src="getcode?id="+Math.random();
             }
             $("#code").blur(function(){
             //alter("进入");
             $("#msg").html("");
             	$.getJSON("CheckCodeServlet",{"code":$(this).val()},function(data){
             	//console.log(data.result);
             	$("#msg").html(data.result);
             	});
             });
               	/*  function imgrefresh(){
            	 		document.getElementById("imgcode").src="getcode?id="+Math.random();
             		 }
             		 $("#code").blur(function(){
             		 	$("#msg").html("");
             		 	$.getJSON("CheckCodeServlet",{"code":$(this).val()},function(data){
             		 		$("#msg").html(data.result);
             		 	});
             		 	
             		 }); */
             </script>
              </div>
              <div>
                <button class="btn btn-default submit">登录</button>
                <a class="reset_pass" href="#">忘记密码?</a>
              </div>

              <div class="clearfix"></div>

              <div class="separator">
                <p class="change_link">New to site?
            
                </p>

                <div class="clearfix"></div>
                <br />

                <div>
                  <h1><i class="fa fa-paw"></i> Gentelella Alela!</h1>
                  <p>©2016 All Rights Reserved. Gentelella Alela! is a Bootstrap 3 template. Privacy and Terms</p>
                </div>
              </div>
            </form>
          </section>
        </div>
      </div>
    </div>
  </body>
  </html>